<template>
	<view class="bg-white" style="height: 100vh;">
		<cu-custom :bgColor="NavBarColor" :isBack="true" backFlag="navigate">
			<block slot="backText">返回</block>
			<block slot="content">详情</block>
		</cu-custom>
		<view class="cu-list menu margin-top">
			
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">所属项目:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.projectId}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">事件标题:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.emergencyTitle}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">上报人:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.userName}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">上报时间:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.reportTime}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">经度:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.longitude}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">纬度:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.dimension}}</text>
				</view>
			</view>
			

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				
				<view style="width: 6rem;">
					<text class="text-black title ">地理位置:</text>
				</view>
				<view style="">
					<textarea
						style="border:solid 1px #3c9cff; 
						border-radius:8px; 
						resize:none; 
						margin-left: 1rem;
						width: 200px; 
						height:70px;
						overflow:auto;
						font: 14px 正体;
						text-align: left;"
						placeholder-style="position: absolute;left:1.2rem;top:0.7rem" 
						placeholder="" 
						name="input" 
						disabled
						v-model="annotation.location">
					</textarea>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				
				<view style="width: 6rem;">
					<text class="text-black title ">上报描述:</text>
				</view>
				<view style="">
					<textarea
						style="border:solid 1px #3c9cff; 
						border-radius:8px; 
						resize:none; 
						margin-left: 1rem;
						width: 200px; 
						height:70px;
						overflow:auto;
						font: 14px 正体;
						text-align: left;"
						placeholder-style="position: absolute;left:1.2rem;top:0.7rem" 
						placeholder="" 
						name="input" 
						disabled
						v-model="annotation.description">
					</textarea>
				</view>
			</view>
			
			<view class="padding flex flex-direction">
				<button class="cu-btn bg-blue lg"  @click="showPic()">查看图片</button>
			</view>
			<view class="padding flex flex-direction">
				<button class="cu-btn bg-orange lg"  @click="showVideo()">查看视频</button>
			</view>
		</view>
	</view>
</template>

<script>


export default {
	data(){
		return{
			NavBarColor:this.NavBarColor,
			annotation:{
				id:"",
				titile:"",
				startTime:"",
				sender:"",
				msgContent:"",
				recordVideo:"",

			},
			goodNumber:null,
			flg:true,
			src:"",
			pic:""
			
		}
	},

	onLoad: function (option) {
	    const annItem = JSON.parse(decodeURIComponent(option.item));
		this.annotation = annItem 
		this.src=this.annotation.reportVideo
		this.pic=this.annotation.reportPic
		console.log(this.annotation.recordPic)
	},
	created(){
		console.log("created")
	},
	methods:{
	   showVideo() {
				uni.navigateTo({
					url: '/pages/common/commonVideo?item='+this.src
				}) 
	   }, showPic() {
		   console.log(this.pic)
				uni.navigateTo({
					url: '/pages/common/commonPic?item='+this.pic
				}) 
	   }
	}
}
</script>

<style>
	
</style>
